Skip to content

Conversation

@ZackPierce
Copy link
Contributor

This improves the usability of the *_from_slice method of encoding a group of fixed-size members all in one go by removing an unnecessary link between the input slice that will be copied and the output data buffer. The fact that we're copying bytes behind the curtains obviates the need to do more than be sure the slice lives for the duration of the method call.

Preliminary testing also shows an ~10% performance encoding improvement over the immediate alternatives and reduces client-user temptation to apply unsafe methods.

@mjpt777

@ZackPierce ZackPierce changed the title Remove a spurious lifetime from a parameter a slice-encoding method [Rust] Remove a spurious lifetime from a parameter a slice-encoding method Sep 28, 2017
@mjpt777 mjpt777 merged commit a523ca7 into aeron-io:master Sep 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants